﻿/*
 * ImageGallery 
 * An ASP.NET control for publishing Image Galleries on the web.
 * Copyright (C) 2008 Imesh Gunaratne
 * http://code.google.com/p/imagegallery
 * 
 * This file is part of ImageGallery.
 *
 * ImageGallery is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ImageGallery is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with ImageGallery.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * History: 2008/10/07 Created.
 *          
 */

using System;
using System.Web;

namespace ImageGallery
{
    public class Global : HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            ImageGallery.ThreadManager.UpdateFlickrImageCache();
        }

        void Application_End(object sender, EventArgs e)
        {
            //  Code that runs on application shutdown
            ImageGallery.ThreadManager.Abort();
        }

        void Application_Error(object sender, EventArgs e)
        {
            // Code that runs when an unhandled error occurs

        }

        void Session_Start(object sender, EventArgs e)
        {
            // Code that runs when a new session is started

        }

        void Session_End(object sender, EventArgs e)
        {
            // Code that runs when a session ends. 
            // Note: The Session_End event is raised only when the sessionstate mode
            // is set to InProc in the Web.config file. If session mode is set to StateServer 
            // or SQLServer, the event is not raised.

        }
    }
}